<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    img {
      width: 200px;
      transition: all 2s;
    }

    img:hover {
      transform: rotate(360deg);
      transform: rotate(-360deg);
    }
  </style>
</head>
<body>
  <img src="./images/rotate.png" alt="">
</body>
</html>